<%@ page language="java" contentType="text/html;charset=utf-8"
	pageEncoding="utf-8"%>
<%@ page import="java.util.*"%>
<%@ page import="com.sms.note.*, com.sms.user.*"%>
<%@ page import="net.sf.json.*"%>

<%--
	project/teacher/add-project.jsp
 --%>

<%
	//清除内存
	response.setHeader("Pragma", "No-cache");
	response.setHeader("Cache-Control", "no-cache");
	response.setDateHeader("Expires", 0);
%>

<%
	request.setCharacterEncoding("utf-8");
	String userno = session.getAttribute("userno").toString();
	
%>

<body>
	<div id="note" align=center style="padding:20px">
		<form id="note_edit" method="post" action="Dealaddnote" enctype="multipart/form-data" target="addnote_iframe"> 
			<input type="hidden" name="fromID" value="<%=userno%>" />
			<table cellpadding="0" cellspacing="0" width:100% height="100%">
				
				<tr>
					<td width="10%"><label for="name">标题：</label>
					</td>
					<td style="text-align:left;"><input name="title" id="title"
						style="border:0;width:100%;height:100% "/>
					</td>
				</tr>
				<tr>
					<td><label for="desc">公告内容：</label>
					</td>
					<td><textarea name="content" id="content"
							style="border:0;width:100%; height:120px; overflow:auto;"></textarea>
					</td>
				</tr>
				
				<tr class="addfiles">
					<td><label for="file">添加附件：</label>
					</td>
					<td style="text-align:left;"><input type="file" name="append"
						id="file" style="border:0;width:100%;height:100%" />
					</td>
					
				</tr>
				<tr>
					<td colspan="2" align="center"><input type="submit"
						id="submit" value="提交" style="margin-top:10px;" />
					</td>
				</tr>
			</table>
		</form >
		
		<iframe name="addnote_iframe" id="result" style="display:none;" >
		
		
		</iframe>
		
	</div>
	<script type="text/javascript">
	$(document).ready(function(){
	$("#submit").click(function(){	
	 var title = $("#title").val();
			var content=$("#content").val();										
			if (title) {
				return true;
			} else {
				alert('请补充完整信息');
				return false;
			}	
	});  

	});	
	
	
	function callback(msg)   
		{   
   		 	//alert(msg);
		 	if(msg=='ok'){                              
		 		alert('添加成功');
		 		var tab = $(".easyui-tabs").tabs('getSelected');
			 		$(".easyui-tabs").tabs('update',
			                        {tab:tab,
									 options:{
								     cache:false,
                                     href:'public_report/teacher/public_report.jsp',
									 }
									});  /*更新面板*/
		 		$("#reportdd").dialog('close');
		 	}
		 	else{
			 	alert('添加不成功!');
		 	}
		 }
	
	</script>
</body>

